package com.glodon.paas.account.api.oauth1;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * Access validation message sent to platform services, who request the access validation process
 *
 * @author Don Li
 */
@XmlRootElement
public class AccessValidationResponse {
    private String realm;
    private String userId;
    private String consumerId;
    private String serviceId;
    private boolean authorized;

    public AccessValidationResponse() {
    }

    public AccessValidationResponse(String realm, boolean authorized) {
        this.realm = realm;
        this.authorized = authorized;
    }

    public AccessValidationResponse(String realm, String userId, String consumerId, String serviceId, boolean authorized) {
        this.realm = realm;
        this.userId = userId;
        this.consumerId = consumerId;
        this.serviceId = serviceId;
        this.authorized = authorized;
    }

    public String getRealm() {
        return realm;
    }

    public void setRealm(String realm) {
        this.realm = realm;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getConsumerId() {
        return consumerId;
    }

    public void setConsumerId(String consumerId) {
        this.consumerId = consumerId;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public boolean isAuthorized() {
        return authorized;
    }

    public void setAuthorized(boolean authorized) {
        this.authorized = authorized;
    }
}
